<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    <title>{$Think.config.site.title} - 站点配置</title>

    <meta name="keywords" content="{$Think.config.site.keywords}">

    <link href="{$Think.config.site.resource_url}css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/animate.min.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/style.min.css?v=4.0.0" rel="stylesheet">

</head>
<style>
#listtable .fa{
	cursor:pointer;
	color:#1ab394;
	margin-right:1em;
}
.inpbox{
	border: none;
	padding:0;
}

.ibox-title .tag{font-size: 12px; color: #e66c6c; font-weight: normal; display: inline-block; margin-left: 20px;}
</style>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
    	<div class="form-horizontal">
      	<div class="row">
            <div class="col-sm-12">
                <div class="float-e-margins">
                    <div class="ibox-title">
                        <h5>站点配置</h5>
                        <span class="tag">双击输入框修改</span>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">公司名称：</label>
                                <div class="col-sm-6">
                                    <div class="form-control jedit" data-key="sites[company_name]">{$sites.company_name}</div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">公司地址：</label>
                                <div class="col-sm-6">
                                    <div class="form-control jedit" data-key="sites[company_address]">{$sites.company_address}</div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">公司电话：</label>
                                <div class="col-sm-6">
                                    <div class="form-control jedit" data-key="sites[company_phone]">{$sites.company_phone}</div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">版权：</label>
                                <div class="col-sm-6">
                                    <div class="form-control jedit" data-key="sites[copy]">{$sites.copy}</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
          	<div class="col-sm-12">
                <div class="float-e-margins">
                    <div class="ibox-title">
                        <h5>参数配置</h5>
                        <span class="tag">双击输入框修改</span>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                        	<div class="form-group">
                                <label class="col-sm-2 control-label text-right">运费：</label>
                                <div class="col-sm-6">
                                	<div class="form-control jedit" number data-key="sites[delivery_fee]">{$sites.delivery_fee}</div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">免运费价：</label>
                                <div class="col-sm-6">
                                    <div class="form-control jedit" number data-key="sites[free_delivery_fee]">{$sites.free_delivery_fee}</div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">当日配送截止时间：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="scheduling" class="form-control" id="scheduling" data-key="sites[scheduling]" value="{$sites.scheduling}" readonly="readonly">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">发票提示：</label>
                                <div class="col-sm-6">
                                    <textarea style="height: 200px" class="form-control invoice" placeholder="以回车键隔开" name="invoice"  data-key="sites[invoice]" >{$sites.invoice}</textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-12">
                <div class="float-e-margins">
                    <div class="ibox-title">
                        <h5>小程序配置</h5>
                        <span class="tag">双击输入框修改</span>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                        	<div class="form-group">
                                <label class="col-sm-2 control-label text-right">APPID：</label>
                                <div class="col-sm-6">
                                	<div class="form-control jedit" data-key="wx[xcx][appid]">{$wx.xcx.appid}</div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">APPSECRET：</label>
                                <div class="col-sm-6">
                                	<div class="form-control jedit" data-key="wx[xcx][appsecret]">{$wx.xcx.appsecret}</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-12">
                <div class="float-e-margins">
                    <div class="ibox-title">
                        <h5>支付配置</h5>
                        <span class="tag">双击输入框修改</span>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                        	<div class="form-group">
                                <label class="col-sm-2 control-label text-right">MCHID：</label>
                                <div class="col-sm-6">
                                	<div class="form-control jedit" data-key="wx[pay][mchid]">{$wx.pay.mchid}</div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">KEY：</label>
                                <div class="col-sm-6">
                                	<div class="form-control jedit" data-key="wx[pay][key]">{$wx.pay.key}</div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">SSLCERTPATH:</label>
                                <div class="col-sm-6">
                                	<div class="form-control jedit" data-key="wx[pay][sslcert_path]">{$wx.pay.sslcert_path}</div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">SSLKEYPATH:</label>
                                <div class="col-sm-6">
                                	<div class="form-control jedit" data-key="wx[pay][sslkey_path]">{$wx.pay.sslkey_path}</div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">NOTIFYURL：</label>
                                <div class="col-sm-6">
                                	<div class="form-control jedit" data-key="wx[pay][notify_url]">{$wx.pay.notify_url}</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </div>
    </div>

    <script src="{$Think.config.site.resource_url}js/jquery.min.js?v=2.1.4"></script>
    <script src="{$Think.config.site.resource_url}js/bootstrap.min.js?v=3.3.5"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/peity/jquery.peity.min.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/layer/layer.js"></script>
    <script src="{$Think.config.site.common_resource_url}js/majax.js"></script>
    <script src="{$Think.config.site.common_resource_url}js/jedit.js"></script>
    <script src="{$Think.config.site.common_resource_url}js/laydateV5/laydate.js"></script>
</body>

</html>
<script>
$('.jedit').jedit({
	class:'inpbox',
	inputclass:'form-control',
	before:function(old){

	},
	complete:function(n){

	},
	cancle:function(n){

	},
	change:function(n,old){
		var key = $(this).data('key');var data = {};
		if (typeof($(this).attr("number"))!="undefined") {
			if (isNaN(n)) {
				layer.msg('请输入数字',{icon: 2})
				return false;
			}
		}
		data[key] = n;
		majax('{:url("edit")}',data,function(d){

		})
	}
});

$('.invoice').change(function(){
    var key = $(this).data('key');var data = {};
    data[key] = $(this).val();
    majax('{:url("edit")}',data,function(d){

    })
})

//时间选择器
laydate.render({
    elem: '#scheduling',
    type: 'time',
    format: 'H:mm',
    done: function(value, date){
        var key = $('#scheduling').data('key');var d = {};
        d[key] = value;
        majax('{:url("edit")}',d,function(d){

        })
    }
});
// $('#scheduling').change(function(){
//     alert(1)
//     console.log($(this).val());
// })
</script>